package cn.tedu.submarine;
import javax.swing.*;
public class MineSubmarine extends SeaObject implements EnemyLife{
    public MineSubmarine(){
        super(63,19);
    }
    public void move(){
        setX(getX() + getSpeed());
    }
    /** 重写*/
    public ImageIcon getImage(){
        return Images.minesubm;
    }
    /** 发射水雷*/
    public Mine shootMine(){
        return new Mine(this.getX()+this.getWidth(),this.getY()-11);//this指水雷潜艇
    }
    /** 重写奖励命数 */
    public int getLife() {
        return 1;       //奖励1条命
    }
}
